getDataFromOption optimize from #1031