remove unnecessary casting for boolean field