Fixed this null pointer exception while saving
Now I can use the portal block.