added util to check an option struct for a function