Add in some checking