fix the null pointer exception in case of no annotation