nit: 
one less logic step and easier to read I think:

```if isinstance(value, int) and value < 1```