Safer checks for apidoc renderer