Singularity less laggy by me.

Applying cloroxygen changes later.
Should be 
```
if(istype(A))
    A=A.loc
else
   return
```
(With proper indents)