Can we avoid doing this type identification on both the client and server side? Can't we just detect it on the server side?