added error checking while converting raw input to Number and Date objects