Improve options type detection