properly unwrap Optionals in Jersey resources