Added better message for a valid unit type