Condition for Nonexistence of Aharonov-Bohm Effect