Typecast model id only if using mongodb AR class