Check transaction to be valid before adding