Fix attempt to call #visit on NilClass