Characterizations of distributions through some identities