Now a better way of casting to boolean is used.