Add type checking for options