lazy error checking