checking for empty string in modes