Adding checks to make sure transport is valid before attempting to use it
More checks
...