SUP-520 #comment Fix Categories saved with spaces in the beginning

Added toObject func to trim the name property and only than continue
to the parent toObject