Handling null fields from Query