Mongodb id validation

According to the documentation at http://php.net/manual/en/class.mongoid.php it's complex variable parsed syntax, although I haven't been able to find any documentation on it yet (The link in the documentation refers to usage of curly brackets in strings to access variable value). It's a way of defining and accessing variables with a `$` in their name.

I can use a string-cast if you prefer ;)