Only set the 'valueAsNumber' property is the value is valid
Merge pull request #1186 from fredj/validate_valueAsNumber

mouse-position example: Projection select issue