improve Valid.key, ignore key spaces