This method retrieves an entity's component, if it exists.
Returns a component if it exists, otherwise nil is returned.