Use the correct conditional for raising an error