Is explicit casting here necessary? Isn't it already a boolean?