make sure error isn't null