improve null case for parsing