Fixing NullPointerException when creating item for first time.