Checking stack growing direction