In mixer bowl, beat together cream cheese, butter or margarine, and vanilla until light and fluffy. Gradually add powdered sugar, beating till smooth. Beat in coconut. Spread over cooled cake. Sprinkle with chopped nuts if desired. Store leftover frosting in the refrigerator, tightly covered.