Update CreateInvite.java

added check for proper return condition, leaving error for compatibility with broken environments