This tweaks a logic check in order to return a proper error value when the related condition is not satisfied.