Fix isValidFirstKey for eg. function keys