I'm not sure if this will be a spot-on solution, but here's how I solved the same error for me:
Problem: Frequently/Non-frequently getting error message: No SIM Card Inserted.
Solution: Get a new micro SIM.
My card was probably not punched correctly so every now and then the phone forgot it was in there, I got it changed and haven't seen that message even once
Google Nexus 4
AOSP KitKat 4.4
HTC Desire V [Sold]
Sony Xperia P [Sold]