Refactoring  - function extraction
Refactoring - renaming a function into is_scalar