checking options instead of this causing username undefined error