Adding check for empty values