Fix the hasattr check, it requires a string...