refactoring the read_scalar parser & add a is helper (avoid to repeat a list of checks)