Reuse `maybe_visit` method

This commit simply removes duplicated code by reusing the
existing `maybe_visit` method.
Merge pull request #325 from claudiob/reuse-maybe-visit-method

Reuse `maybe_visit` method