Prevent ClassCastException on options when the options are empty