Is this cast safe? If so, please add comment explaining why.