added check for empty string in select type