Step 3

Second version (is_scalar)