Fix typo and change check to prettiest way