Fix #536: Check type of arguments of exported methods