Check if rval type value is valid + unit check
fixed some typo errors.
Merge pull request #571 from basvandervlies/rval_wrong_input_type

Check if rval type value is valid + unit check