Javascript If Statement Check If Variable Has Value