Is "else statement" here required? "sort" variable is initialized as empty and due to null check can not be set wrongly. Same for "where" attribute.