Safety checks to ensure parsing doesn't run into exceptions.