Use isinstance for float/int instead of none