Fixes bug when it's passed a null parameter