About a half-dozen other states have passed similar legislation