There are seven fundamental SI units (seconds (time), metres (length), kilograms (mass), ampere (current), kelvin (temperature), mole (amount of substance) and candela (luminous intensity) - https://en.wikipedia.org/wiki/International_System_of_Units.
There are a bunch of derived units and acceptable prefixes (for orders of magnitude) (see that Wikipedia page). When you see a measurement expressed purely in terms of one or more of those units (like Nm or N/m), then it is an acceptable SI unit. But, if you mix and match prefixes in a unit (gram per cubic centimeter, for example), then you've fallen off the SI truck. As the Wiki page puts it: When prefixes are used to form multiples and submultiples of SI base and derived units, the resulting units are no longer coherent.
One thing that is important to note is the importance of dimensional analysis. As others have pointed out, Nm and N/m are very different, as are $Nsm^{−1}$, Nsm and $Nsm^2$. When you multiply or divide two quantities, carry the corresponding units around and do a similar multiplication or division of the units to figure out what the resuling unit should be. For example, the specific heat of water at standard conditions is about $4180\ Jkg^{−1}K^{−1}$ (joules per kilogram per kelvin). It I want to raise the temperature of 10 kg of water 2 kelvin, I will need $$10kg\ \cdot \ 2K\ \cdot \ 4180\ Jkg^{−1}K^{−1}$$.
Multiplying the numbers is easy (10 x 2 x 4180 = 83,600). But, then you need to consider the units of the result. Multiplying the units out yields: $$kg \cdot K \cdot J \cdot kg^{−1}K^{−1}$$ Then go through and delete units that "cancel themselves out" ($kg \cdot kg^{-1}$ and $K \cdot K^{−1}$). What's left is Joules. So the answer is 83,600 J. Since our expectation is that some amount of energy is needed to raise the temperature of water, we can be more confident in the answer.