cast value as boolean