fixes crash if parent is null
removed useless method
you can check if an object exists