Protect for null check and Proper indentation

**Line 390-391:** Relocating `Number` function ensures that `theNumber` variable can be `null` checked later in the `if` statement. E.g.
```javascript
if(!isNaN(Number(theNumber)) && theNumber)
// or
if(!isNaN(Number(theNumber)) && theNumber !== null)
```

**Line 435-437:** The second `else` is under second `if`. Hence, Proper indentation.
This is not how anyone indents else statements.