STY: Changed yield-check idiom to pass dtype instead of arrays.