add null checks for skills to avoid NRE.