Getting sObject Type into lightning component
You can implement force:hasSObjectName
interface in your lightning component and you can get the name of the sObject type.
<aura:component implements="force:hasSObjectName">
<aura:attribute name="sobjecttype" type="String" default="{!v.sObjectName}"/>
{!v.sobjecttype}
</aura:component>
I presume you are passing an Id into your component?
You can pass the Id to the server and use the Apex Id.getSObjectType() method to discover the type that you can then pass back.
Or if the set of types is limited, you could use DescribeSObjectResult.getKeyPrefix() calls to obtain the key prefixes (the first 3 characters of an Id) for those types and pass those back so your component can do the Id to type translation.