Prevent IllegalArgumentException

If service is not connected, it throws IllegalArgumentException