Removed null check that was causing type error.