Fix NullPointerException

-when do not have a parent component