Modified for null pointer exception if annotation is absent