Adding two small safety checks.