implement a method to convert javascript variable type to DBus