Added && statement to check if variable is not empty