check if error is null.