Extra checks to avoid warnings in log