set position to default value if POST request don't have position argume...

...nt

TNL-922
@waheedahmed @adampalay @rocha 
I would have probably written something like this:
```
try:
  position = int(data.get('position', 1))
except ValueError:
  position = 1
self.position = position if position > 0 else 1
```
The logic is a little bit simpler.

Also, when checking if a something it is a string, use `isinstance(x, basestring)`, which is `True` when `x` is either a `str` or `unicode`.