Use actual class for generic object bind

If the generic objects value is not null, bind method should use the actual class of the object. This enables foreman to use custom argument factories for custom classes defined by the user.

This is currently possible via the dynamicBind method of SQLStatement, but I think it is a bit verbose