Ed B covered the Basics. But the side stand switch, clutch switch, relay or neutral safety switch may be bad. The answer to your question is yes. It should start even is the stand is down if the clutch is pulled in or the motor is in neutral but the engine should die if you let out the clutch and the stand is down and the motor in gear. It keeps you from driving off with the side stand down.
1. If you have it started and let out the clutch with the side stand up, and it dies then the side stand switch is bad.
2. If it will only crank in neutral, even if the clutch is pulled in, then the clutch switch on the handle bars is bad.
3. If it won't crank in neutral unless the clutch is pulled in then then the neutral safety switch is bad.
4 If it will only crank in neutral then the clutch switch is bad.
5. There is a starter relay that may be going bad if the problem is random.
6. Most likely problem is the side stand safety switch is hanging up or there is a bad connection in the wiring harness.
7. You can bypass all the safety switches by jumping the contacts at the relay, but then you can energies the starter with the side stand down and if its in gear it will fall over. Also you can drive off with the stand down and can't turn left because the side stand will stick in the ground.
This is the option I have taken, but it has caused some embarousing and dangerous problems in the past.