[Amibe] Fix a possible NullPointerException