Don't set var keyword if namespace contains a dot

I've been using MyObject.myjson as namespace, but a var keyword was preceded by. This fix sets a var key word only if namspace doesn't contain a dot