Updated to_bool? to use ternary operator