better checker for empty input