Check if error is NULL before setting instance.