This exception is caused by an incorrect Friends 2.2.5 function called by NTeleportation. In Friends, AreFriends() expects two ulong arguments, thus the invalid cast exception. The Friends function that accepts string arguments for user id's is AreFriendsS(). Note the trailing 'S' in the function name.
In NTeleportation.AreFriends, change:
return Friends.Call<bool>("AreFriends", playerId, targetId);
To this:
return Friends.Call<bool>("AreFriendsS", playerId, targetId);