Handle potential undefined; remove profane log message