Apparently not having any joysticks connected does not in fact make it return null, but an empty array... so commented the part out that causes crashing when no controllers are plugged in or there is a lack of controller support on the system.