Cannot invoke "Object.getClass()" because "" is null