Add object prototype utility function.