A simple .Net guard class