People who keep weapons such as zombie knives and knuckledusters in their homes could be jailed under a new law.