Return None from get_swap() if input is not swap

If a non-swap parameter is passed to get_swap(), return None,
rather than returning the parameter itself.

Change-Id: Icfb0eb0e4d721522160d0b7a4fd9b98c1871a10a
Closes-bug: #1214406
Merge "Return None from get_swap() if input is not swap"