The handshake problem The handshake problem is the classic problem that for n people in a room, if they all shake hands, what's the total number of handshakes that occur. 

You code should take an input of any number and output the number of handshakes, both in base ten.

Also the code should not let non-integers through. You should output a falsey in this case. The only expected inputs are positive whole integers and positive real numbers - you don't need to worry about complex numbers or strings as inputs. 
This should mean that you should expect n &gt;= 0

Test cases

(N:handshakes)
0:0
10:45
20:190
10.5:0
1337:893116


Normal golfing rules apply and shortest code wins. 
If your code isn't self explanatory, please explain. 

Jelly and 05AB1E are the winners, both at 2 bytes
JavaScript ES6, 16

n=&gt;n%1?0:~-n*n/2


Test



f=n=&gt;n%1?0:~-n*n/2

function test()
{
  var i=I.value
  O.textContent=f(i)
}  
&lt;input id=I oninput=test()&gt;&lt;span id=O&gt;&lt;/span&gt;