Check for not empty and removed extra if.