Bugfix : serialize method now checks if the attribute is a method before applying it to the object