add getOptional to standardize optional arg detection