Instead of ``is_a`` as the class name as string, what about using ``if ($annot instanceof QueryParam)`` ?