Issue description
I expect something like py::cast<py::bytes>(x) to check if the py::object x is actually bytes. It does not.
Reproducible example code
#include <pybind11/pybind11.h>
#include <iostream>
namespace py = pybind11;
int main() {
Py_Initialize();
auto gil = PyGILState_Ensure();
PyObject *l = PyFloat_FromDouble(3.14);
//PyObject *l = PyBytes_FromString("foo");
auto n = py::cast<py::bytes>(l);
std::cerr << "No problem yet...\n";
std::cerr << static_cast<std::string>(n);
PyGILState_Release(gil);
return 0;
}