robust readVal function