refactor: cleanup isNullOrUndefined usage