Handling null values in view