Cast val to bool