fixed cloning non-clonable items

I noticed an issue cloning object contained a \ReflectionClass instance.
Thus, I added a check if object is cloneable before cloning it.