honors REP 117 reference implementation

by checking for valid values

Looking other code, and also checking the REP 117 reference implementation (http://www.ros.org/reps/rep-0117.html), I think it's better to implement the check this way (much clear to read) and it's also safe (follow the link to see the explanation in the `Backwards Compatibility` section).

The test pass after the change.
I've also create a map with `roslaunch reem_2dnav_gazebo reem_mapping.launch`