If the phone is locked to a carrier, you may need to keep a SIM in it even after activation. My husband's iPhone 5, locked to AT&T, won't function at all without a SIM in it; as soon as you pop the SIM out, it locks up with a message indicating it needs activation, and it won't work without a SIM from the carrier it's locked to. I finally stuck a no longer valid AT&T SIM from my previous account into it; since then, it makes a fine iPod.
Conversely, my own unlocked iPhone 5 is fine empty, just spits out a "No SIM" message at me once in a while.
Inactive SIMs work well for this type of thing, and as another poster said, they're cheap on eBay if you don't already have one of the right size.