Add some guard code.