getOption function

A slightly modified version of getOption()