make sure value is defined before we try and parse