Any such city may provide for the inspection of motor vehicles operated upon the streets, alleys, or highways thereof when owned or operated by residents or by persons who maintain a place of business in any such city where so operated.