Added check for cast to bigger signed type