I think you need a null check here. `getCurrentPage(adaptable)` and `getDesigner(adaptable)` could return null.