change check for empty name