Remove redundant ternary expression

Replace it with casting to a boolean