checking for existence of option.optionValues before iterating in product controller