Removing unnecessary array check