Replaces undefined checks with _.isUndefined for consistency.