Avoid NPE in get Parent