Add IS_DEVICE checks for all calls which take a device parameter.