Some sanity checking in the parsing