Don't serialize data option if it isn't an object