Added null check for annotation