Added check for empty options.